﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Core.Configuration;
using Microhard.WarehouseInsp.Buz.JHWorkflow;
using Microhard.Core;
using Microhard.WarehouseInsp.Buz.DataAccess;

namespace Microhard.WarehouseInsp.Buz.Impls
{
    public class SysInitCheck : IConfigCheckList
    {
        bool IConfigCheckList.SysInitCheck()
        {
            bool rtn = false;
            try
            {
                //c6是否连接正常
                C6Entities c6 = new C6Entities();
                var cnt = c6.JHBJ_Crm_Customer.Count();

                //warehouse
                WarehouseInspEntities wie = new WarehouseInspEntities();
                var cnt1 = wie.SupProjects.Count();

                rtn = true;
            }
            catch (Exception ex)
            {
                Log.Error("SysInitCheck", ex);
            }
            return rtn;
        }
    }
}
